import { JsonApiService } from 'src/app/api/JsonApi.service';
import { ValidatorService } from 'src/app/api/validator.service';
import { SchemaService } from './Schema.service';
export class FormMenuService {
  private jsonApiService: JsonApiService;
  private validatorService: ValidatorService;
  private schema: SchemaService;
  constructor() {
    this.jsonApiService = new JsonApiService();
    this.validatorService = new ValidatorService();
    this.schema = new SchemaService();
  }
  save(data) {
    return this.validatorService.validate(
      this.jsonApiService.checkGet(`/get`, data),
      this.schema,
      data
      // this.schema.checkPaths(['input'])
    )
  }
}